package com.ctg.itrdc.imageconsole.service;

import java.util.List;

import com.ctg.itrdc.imageconsole.data.dto.DockerImageFileDTO;
import com.ctg.itrdc.imageconsole.data.entity.DockerImage;
import com.ctg.itrdc.paspsdk.common.entity.PageInfo;

public interface IDockerImageService {
	
	/**
	 * 镜像分页查询
	 * @param entity
	 * @param currentPage
	 * @param perPageNum
	 * @return
	 */
	PageInfo<DockerImageFileDTO> queryImageFilePageInfo(String imageName
			,String imageType
    		,Integer currentPage, Integer perPageNum);
	
	/**
	 * 基础镜像分页信息
	 * @param entity
	 * @param currentPage
	 * @param perPageNum
	 * @return
	 */
//	PageInfo<DockerImageFileDTO> queryBasicImageFilePageInfo(DockerImageFileDTO entity, Integer currentPage, Integer perPageNum);
	
	/**
	 * 应用镜像分页信息，根据租户id来划分
	 * @param entity
	 * @param tenantId 租户id
	 * @param currentPage
	 * @param perPageNum
	 * @return
	 */
//	PageInfo<DockerImageFileDTO> queryAppTypeImageFilePageInfo(DockerImageFileDTO entity, 
//    		Long tenantId, Integer currentPage, Integer perPageNum);
	/**
     * 通过镜像文件id获取应用名
     * @param dockerImageFileId
     * @return
     */
	String getAppNamesByDockerImageFileId(Long dockerImageFileId);
	
	List<DockerImage> selectByExample(DockerImage entity);

	DockerImage selectByDockerImageFile(DockerImage entity);

	/**
	 * 根据镜像ID查找镜像文件信息
	 * @param dockerImageFileId
	 * @return
	 * @throws Exception
	 */
	DockerImageFileDTO FindByPrimaryKey(Long dockerImageFileId) throws Exception;

	int updateByPrimaryKey(DockerImage entity);
	
	int deleteByPrimaryKey(DockerImage entity);
	
	boolean saveFile(byte[] bfile,String fileDirPath,String fileName);

}
